<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 一、字体小于12px的解决方案 \
        默认字体16px 最小值12
        */
        .cartData {
            width: 100px;
            height: 100px;
        }

        .Num {
            font-size: 12px;
            /* // 解决兼容性问题 */
            -webkit-transform: scale(0.7);
        }

        /* --------------------------------------------------- */
        .element {
            width: 200px;
            height: 200px;
            background-color: red;
            margin: 0 auto;
            position: relative;
        }

        /* 单边框 */
        .element::before {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 1px;
            background-color: blue;
        }

        /* 多边框 */
        /* .element::after {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 200%;
            height: 200%;
            border: 1px solid black;
            transform-origin: 0 0;
            transform: scale(0.5);
        } */
    </style>
</head>

<body>
    <!-- 小于12px字体 -->
    <div class="cartData">
        <div class="Num">你好</div>
    </div>
    <!--  边框小于0.5-->
    <div class="element">11111</div>
</body>

</html>